package org.example.DesignPatterns.Strategy;

/**
 * @description:
 * @author: farprt
 * @create: 2022-03-09 22:18
 **/
public class CashRebate extends CashSuper{

    private double moneyRebate=1d;

    public CashRebate(String moneyRebate){
        this.moneyRebate=Double.valueOf(moneyRebate);
    }

    @Override
    public double acceptCash(double money) {
        return money*moneyRebate;
    }
}